package cn.yunhe.services.impl;

import cn.yunhe.dao.IAccountDao;
import cn.yunhe.entity.Account;
import cn.yunhe.services.IAccountService;
import lombok.Getter;
import lombok.Setter;

import javax.annotation.Resource;
import java.util.List;

@Getter
@Setter
public class AccountService implements IAccountService {

    @Resource
    private IAccountDao accountDao;

    @Override
    public Account get(int aid) {
        return accountDao.get(aid);
    }

    @Override
    public void addAccount(Account account) {
        accountDao.addAccount(account);
    }

    @Override
    public void delAccount(int aid) {
        accountDao.delAccount(aid);
    }

    @Override
    public void updateAccount(Account account) {
        accountDao.updateAccount(account);
    }

    @Override
    public List<Account> searchAll(String hql) {
        return accountDao.searchAll(hql);
    }
}
